-- GENERATED SPELL FOR [Star Scryer] --


function spell0_20034(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(37126,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20034', 653, 1)
end

function spell1_20034(pUnit, Event) --@Domination,n/a--
pUnit:FullCastSpellOnTarget(37122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20034', 10350, 1)
end

function spell2_20034(pUnit, Event) --@Starfall,n/a--
pUnit:FullCastSpellOnTarget(37124,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20034', 9000, 1)
end

function Sorts_20034(pUnit, Event)
local choix_sorts_20034 = math.random(0, 2)
if choix_sorts_20034 == 0 then
pUnit:RegisterEvent('spell0_20034', 1, 1)
end
if choix_sorts_20034 == 1 then
pUnit:RegisterEvent('spell1_20034', 1, 1)
end
if choix_sorts_20034 == 2 then
pUnit:RegisterEvent('spell2_20034', 1, 1)
end
end

function mob20034_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20034', math.random(1500, 3000), 1)
end

function mob20034_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20034_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20034_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20034, 1, 'mob20034_Action')
RegisterUnitEvent(20034, 2, 'mob20034_Leave')
RegisterUnitEvent(20034, 3, 'mob20034_Kill')
RegisterUnitEvent(20034, 4, 'mob20034_Die')
